<template>
	<div>
    <div id="check">
      <div class="check-container">
        <div class="h">成都倍特</div>
        <div class="m">
          <div style="margin-top: 10px;margin-bottom: 115px">批</div>
          <div style="margin-bottom: 115px">记</div>
          <div>录</div>
        </div>
        <div class="f">
          <div class="f-m-b">品名：<span style="font-size: 27px" v-html="checkList.productName"></span></div>
          <div class="f-m-b">规格：<span style="font-size: 27px" v-html="checkList.productSpec"></span></div>
          <div class="f-m-b">批号：<span style="font-size: 27px" v-html="checkList.batchNumPrefix"></span></div>
          <div class="f-m-b">生产日期：<span style="font-size: 27px">{{ zcList.productionDate | showTime(0) }}</span></div>
          <div>有效期至：<span style="font-size: 27px">{{ zcList.validityDate | showTime(0) }}</span></div>
        </div>
      </div>
    </div>
	</div>
</template>

<script>
  import {
    getCheckInfo
  } from '@/api/check'
  import { CODE_OK } from '@/common/js/config'
  import { isBlank,parseTime } from '@/common/js/utils'
	export default {
    data() {
      return {
        visible: false,
        checkList: {},
        zcList: {}
      }
    },
    props: ["childDataForm"],
    created() {
      if (!isBlank(this.childDataForm)) {
        this.checkList = this.childDataForm
        this.getData()
        this.visible = true
      }
    },
    methods: {
      getData() {
        const params = {
          content: 'zc',
          checkMergeId: this.checkList.checkMergeId
        }
        getCheckInfo(params).then(res => {
          if (res.code === CODE_OK) {
          	this.zcList = res.info.zcList
          }else{
          	this.$message.error(res.msg)
          }
        })
      },
      close() {
        this.visible = false
        this.$emit('close')
      }
    }
	}
</script>

<style type="text/scss" lang="scss" scoped>
  .check-container{
    color: black;
    background-color: #fff;
    font-family: SimSun;
    font-size: 19px;
    letter-spacing: 0.1px;
    width: 960px;
    height: 1480px;
    padding: 15px;
    .h{
      text-align: center;
      height: 325px;
      font-size: 86px;
      font-weight: bold;
      line-height: 330px;
    }
    .m{
      font-size: 76px;
      font-weight: bold;
      text-align: center;
      height: 670px;
    }
    .f{
      font-weight: 600;
      font-size: 32px;
      margin-left: 255px;
      .f-m-b{
        margin-bottom: 10px;
      }
    }
  }
</style>
